package com.itheima.zy;


import java.util.Random;
import java.util.Scanner;

public class Test6 {
    public static void main(String[] args) {
        Random rand = new Random();
        int a = rand.nextInt(100) + 1;
        System.out.println("猜一猜：");

        while (true){
            Scanner sc = new Scanner(System.in);
            int b = sc.nextInt();
            if (b > a){
                System.out.println("太大了");
            }else if (b < a){
                System.out.println("太小了");
            }else {
                System.out.println("答对了");
                break;
            }

        }

    }
}
